<?php
/* @var $this SlideAdminController */
/* @var $model Slide */

$this->breadcrumbs=array(
	'Slides'=>array('index'),
	'Manage',
);

$this->menu=array(
	array('label'=>'Thêm mới Slide', 'url'=>array('create')),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$('#slide-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>
<h1>Quản trị Slide</h1>
<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'slide-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		'slide_id',
		array(
            'name'=>'slide_image',
            'type'=>'raw',
            'value'=>'CHtml::image(IMG_SLIDER_FOLDER.$data->slide_image)',
        ),
		'slide_url',
		array(
			'class'=>'CButtonColumn',
            'deleteConfirmation'=>CONFIRM_DELETE,
		),
	),
)); ?>
